import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { ProductDetailComponent } from './product-detail/product-detail.component';
import { ProductListComponent } from './product-list/product-list.component';
import { GroupsComponent } from './groups/groups.component';
import { GroupsDetailComponent } from './groups-detail/groups-detail.component';
import { ProductRoutingModule } from './product-routing';

// import expression, modify, add product modal dailog, expression dialog component
import { ModifyComponent } from './modify/modify.component';
import { ConfirmComponent } from './confirm/confirm.component';
import { ExpressionComponent } from './expression/expression.component';
import { ExpressionDialog } from './expression/expression-dialog/expression-dialog.component';
import { AddProductModalDailogComponent } from './modal-dailog/add-product-modal-dailog.component';
// import condtion builder
import { ConditionBuilderComponent } from './condition/condition-builder.component';
// import ngx-bootstrap modal module
import { ModalModule } from 'ngx-bootstrap/modal';
// import ngx-bootstrap button module
import { ButtonsModule } from 'ngx-bootstrap/buttons';
import { PaginationModule } from 'ngx-bootstrap/pagination'
// import navigate bar
import { NavigateBarComponent } from './navigate-bar/navigate-bar.component';
// import pagination bar
import { PaginationComponent } from './pagination/pagination.component';
// import comparison component
import { ComparisonComponent } from './comparison/comparison.component';
// import add note component
import { AddNoteComponent } from './add-note/add-note.component';
// import group dialog
import { AddGroupComponent } from './add-group-dialog/add-group.component';
// import tag component
import { TagComponent } from './tag/tag.component';
// import charts
import { ChartModule } from './../chart/chart.module';
// import filter search, sort, pagination module
import { Ng2SearchPipeModule } from 'ng2-search-filter';
import { Ng2OrderModule } from 'ng2-order-pipe';
import { NgxPaginationModule } from 'ngx-pagination';
import { ChartRankComponent } from './product-detail/chart-rank.component'
import { ChartReviewComponent } from './product-detail/chart-review.component'
// cumulative line chart component
import { CumulativeLineChartComponent } from './groups-detail/cumulative-line-chart.component';

// import  ng2-nvd3
import { NvD3Module } from 'ng2-nvd3';
// import d3 and nvd3
import 'd3';
import 'nvd3';


@NgModule({
    declarations: [
        ProductDetailComponent,
        ProductListComponent,
        GroupsComponent,
        GroupsDetailComponent,
        ExpressionComponent,
        ModifyComponent,
        AddProductModalDailogComponent,
        ExpressionDialog,
        ConditionBuilderComponent,
        NavigateBarComponent,
        ComparisonComponent,
        AddGroupComponent,
        PaginationComponent,
        AddNoteComponent,
        TagComponent,
        ConfirmComponent,
        ChartRankComponent,
        ChartReviewComponent,
        CumulativeLineChartComponent
    ],
    imports: [
        ProductRoutingModule,
        CommonModule,
        NvD3Module,
        ReactiveFormsModule,
        FormsModule,
        ModalModule.forRoot(),
        ButtonsModule.forRoot(),
        PaginationModule.forRoot(),
        Ng2SearchPipeModule,
        Ng2OrderModule,
        NgxPaginationModule,
        ChartModule
    ],
    entryComponents: [
      AddProductModalDailogComponent,
      ExpressionDialog,
      ModifyComponent,
      ComparisonComponent,
      AddGroupComponent,
      AddNoteComponent,
      ConfirmComponent
    ]
})
export class ProductModule {}
